//import sun.tools.tree.LengthExpression;

/* 
 * Sourabh Jain; sourj@cs.umn.edu
 * main method class for the viro simulations
 */
public class Viro {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		for (int i = 0; i < args.length; i++){
			System.out.println("Argv "+(i+1)+" : "+args[i]);
		}
		if (args.length > 4 || args.length < 3){
			System.out.println("Usage: java Viro input_topology_file input_vid_file <configfile>");
			System.out.println("--------------  OR ----------------");
			System.out.println("Usage: java Viro -g input_graph_file input_vid_file <configfile>");
			System.exit(0);			
		}
		String input_topo = args[0];
		String input_vid = args[1];
		String config = args[2];
		String options = "";
		if (args[0].equals("-g")){
			input_topo = args[1];
			input_vid = args[2];
			config = args[3];
			options = args[0];
			System.out.println("Input is the graph file.(because -g option was used)");
		}
		World myworld = new World(input_topo,input_vid, config, options);
		
		/*
		 * FORMAT FOR THE TOPOLOGY FILE
		 * FIRST LINE WILL CONTAIN "nodes = 100" ; (if there are 100 nodes);
		 * it will be followed by edge information in each line in the following format
		 * "uid1, uid2, weight" (weight will be one for our files)
		 * 
		 * FORMAT FOR THE VID MAPPING
		 * UID,VID
		 */
		myworld.run();
	}
	public static void main1 (String []args){
		System.out.println("Delta:  = "+World.delta(4, 5));
		System.out.println("Delta:  = "+World.delta(0, 1));
		System.out.println("Delta:  = "+World.delta(10, 17));
		System.out.println("to binary string:   = "+World.toBinaryString(-2));
		World.getRdvVID(12l, 1);
		World.getRdvVID(16l, 2);
		World.getRdvVID(18l, 3);
		World.getRdvVID(19l, 4);
		World.getRdvVID(1112l, 1);
		World.getRdvVID(231236l, 2);
		World.getRdvVID(155238l, 3);
		World.getRdvVID(922337203685477580l, 40);
	}

}
